package com.health.pay.tencent.business;

import org.slf4j.LoggerFactory;

import com.health.pay.tencent.common.Log;
import com.health.pay.tencent.common.Util;
import com.health.pay.tencent.common.XMLParser;
import com.health.pay.tencent.protocol.gettransferinfo.GettransferinfoReq;
import com.health.pay.tencent.protocol.gettransferinfo.GettransferinfoResp;
import com.health.pay.tencent.service.GettransferinfoService;

public class GettransferinfoBusiness {

	// 打log用
	private static Log log = new Log(LoggerFactory
			.getLogger(GettransferinfoBusiness.class));

	// 执行结果
	private static String result = "";

	private GettransferinfoService gettransferinfoService;

	public GettransferinfoBusiness() throws IllegalAccessException,
			ClassNotFoundException, InstantiationException {
		gettransferinfoService = new GettransferinfoService();
	}

	public GettransferinfoResp run(GettransferinfoReq gettransferinfoReq) throws Exception {

		// API返回的数据
		String refundServiceResponseString;

		String objXmlString = XMLParser.map2XmlString(gettransferinfoReq.toMap());
		refundServiceResponseString = gettransferinfoService.request(objXmlString);

		GettransferinfoResp gettransferinfoResp = (GettransferinfoResp) Util.getObjectFromXML(
				refundServiceResponseString, GettransferinfoResp.class);

		return gettransferinfoResp;

	}
	
}
